/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author FIRE
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface M8ViewHosp extends BasicModel<M8ViewHosp> {
  code?: string; // 编号
  name?: string; // 名称
  addr?: string; // 地址
  area?: string; // 区域
  croute?: string; // 线路
  routeSort?: number; // 线路顺序
  bsl?: string; // 单日
  bdb?: string; // 双日
  ctype?: string; // 医疗机构性质
  bstop?: string; // 停用
}

export const m8ViewHospList = (params?: M8ViewHosp | any) =>
  defHttp.get<M8ViewHosp>({ url: adminPath + '/bas/hosp/m8ViewHosp/list', params });

export const m8ViewHospListData = (params?: M8ViewHosp | any) =>
  defHttp.post<Page<M8ViewHosp>>({ url: adminPath + '/bas/hosp/m8ViewHosp/listData', params });

export const m8ViewHospForm = (params?: M8ViewHosp | any) =>
  defHttp.get<M8ViewHosp>({ url: adminPath + '/bas/hosp/m8ViewHosp/form', params });

export const m8ViewHospSave = (params?: any, data?: M8ViewHosp | any) =>
  defHttp.postJson<M8ViewHosp>({ url: adminPath + '/bas/hosp/m8ViewHosp/save', params, data });

export const m8ViewHospDelete = (params?: M8ViewHosp | any) =>
  defHttp.get<M8ViewHosp>({ url: adminPath + '/bas/hosp/m8ViewHosp/delete', params });

export const m8ViewHospTreeData = (params?: M8ViewHosp | any) =>
  defHttp.post<M8ViewHosp>({ url: adminPath + '/bas/hosp/m8ViewHosp/treeData', params });

export const m8ViewHospTypeTreeData = (params?: M8ViewHosp | any) =>
  defHttp.post<M8ViewHosp>({ url: adminPath + '/bas/hosp/m8ViewHosp/typeTreeData', params });
